import React, { Component } from 'react'
import { connect } from 'react-redux'
import { logout } from '../store/actions'

class User extends Component {
    render() {
        const { logout } = this.props
        return (
            <div>
                User
                <button onClick={logout} >Logout</button>
            </div>
        )
    }
}

const mapStateToProps = state => ({})
const mapDispatchToProps = {logout}

export default connect(mapStateToProps, mapDispatchToProps)(User)
